<template>
  <a-card :bordered="false" class="card-area">

    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <!-- 搜索区域 -->
      <a-form layout="inline">
        <a-row :gutter="24">
          <a-col :md="6" :sm="8">
            <a-form-item label="审核状态" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
              <j-dict-select-tag  dictCode="auditStatus" v-model="queryParam.auditStatus"/>
            </a-form-item>
          </a-col>
<!--          <a-col :md="7" :sm="8">-->
<!--            <a-form-item label="年度" style="width: 300px">-->
<!--              <date-select v-model="queryParam.yearDate"/>-->
<!--            </a-form-item>-->
<!--          </a-col>-->
<!--          <a-col :md="6" :sm="12">-->
<!--            <a-form-item label="创建时间" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">-->
<!--              <j-date v-model="queryParam.createTime" :showTime="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择创建时间" ></j-date>-->
<!--            </a-form-item>-->
<!--          </a-col>-->
          <a-col :md="6">
            <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
            <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 操作按钮区域 -->
    <div class="table-operator" style="margin-top: 5px">
      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
      <!-- 操作按钮区域 -->
<!--        <a-button type="primary" style="margin-left: 5%" @click="handleAdd" icon="plus">新增</a-button>-->
      <cloud-services-apply-model ref="modalForm" @ok="modalFormOk"></cloud-services-apply-model>

    </div>
    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择&nbsp;<a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项&nbsp;&nbsp;
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        @change="handleTableChange">


        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)" >查看</a>
          <a-divider type="vertical" />
<!--          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!--            <a>删除</a>-->
<!--          </a-popconfirm>-->
        </span>

      </a-table>
    </div>
    <!-- table区域-end -->


  </a-card>
</template>

<script>
  import cloudServicesApplyModel from './cloudServicesApplyModel'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import JDate from '@/components/jeecg/JDate'
  import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
   export default {
      name: 'cloudServicesApplyList',
      mixins:[JeecgListMixin],
      components: {
        cloudServicesApplyModel,
        JDate,
        JSelectDepart
      },
    data () {
      return {
        queryParam: {
          serverName:'',
          office:'',
          auditStatus:'',
        },
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
        },
        pagination: {
          total: 0,
          pageSize: 10,//每页中显示10条数据
          showSizeChanger: true,
          pageSizeOptions: ["10", "20", "50", "100"],//每页中显示的数据
          showTotal: total => `共有 ${total} 条数据`,  //分页中显示总的数据
        },
        columns:[
          {
            title: '机构名称',
            align:"center",
            dataIndex: 'office_dictText',
          },
          {
            title: '操作系统',
            align:"center",
            dataIndex: 'os_dictText',
            // dataIndex: 'disk',
          },
          {
            title: '申请服务器类型',
            dataIndex: 'serverName_dictText',
            align:"center",
          },
          {
            title: '申请ip',
            dataIndex: 'ip',
            align:"center",
          },
          {
            title: '申请端口',
            dataIndex: 'openPorts',
            align:"center",
          },
          {
            title: '费用',
            dataIndex: 'money',
            align:"center",
          },
          {
            title: '节省费用',
            dataIndex: 'useMoney',
            align:"center",
          },
          {
            title: '审核状态',
            dataIndex: 'auditStatus_dictText',
            align:"center",
          },
          {
            title:'操作',
            dataIndex: 'action',
            align:"center",
            scopedSlots: { customRender: 'action' },
          }
        ],
        url: {
          list: "/jinan/serviceApply/list",
          // delete: "/jinan/serviceApply/delete",
          // deleteBatch: "/sys/role/deleteBatch",
          // exportXlsUrl: "/jinan/standingBook/exportXls",
          // importExcelUrl: "jinan/standingBook/importExcel",

        },
      }
    },
     methods: {

     }
    // computed: {
    //   importExcelUrl: function(){
    //     return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    //   }
    // },
  }
</script>


<style scoped>
  @import '~@assets/less/common.less'
</style>